﻿using IOP.Net;
using System;
using System.Collections.Generic;
using System.Net.Sockets;
using System.Text;

namespace IOP.Pulsar.Default
{
    /// <summary>
    /// 原始嵌套字上下文
    /// </summary>
    public class RawSocketContext
    {
        /// <summary>
        /// 原始嵌套字
        /// </summary>
        public readonly Socket RawSocket;
        ///// <summary>
        ///// IP表头
        ///// </summary>
        //public IPHeader Header { get; set; }

        /// <summary>
        /// 原始报文
        /// </summary>
        public Memory<byte> Body { get; set; }

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="rawSocket"></param>
        public RawSocketContext(Socket rawSocket)
        {
            RawSocket = rawSocket;
        }

        ///// <summary>
        ///// 变更IP表头并送出
        ///// </summary>
        ///// <param name="newHeader"></param>
        //public virtual void ChangeIPHeaderAndSendTo(IPHeader newHeader)
        //{

        //}

    }
}
